package liumengbaio.lolzhangyoubao.Activity.Fragment;

import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;

import liumengbaio.lolzhangyoubao.Activity.Activity.FindFriendActivity;
import liumengbaio.lolzhangyoubao.Activity.Activity.RealShowActivity;
import liumengbaio.lolzhangyoubao.Activity.Activity.ShowPlayActivity;
import liumengbaio.lolzhangyoubao.R;

/**
 * Created by lanouhn on 16/8/23.
 */
public class FragmentCommunity extends Fragment {
    private TextView title;
    private Button right_title;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view=inflater.inflate(R.layout.fragment_community, null);
        return view;
    }

    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        initView(getView());
    }

    private void initView(View view) {
        view.findViewById(R.id.real_show).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent_real_show=new Intent(getActivity(),RealShowActivity.class);
                startActivity(intent_real_show);
            }
        });
        view.findViewById(R.id.relative_pay).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent_relative_pay=new Intent(getActivity(),ShowPlayActivity.class);
                startActivity(intent_relative_pay);
            }
        });
        view.findViewById(R.id.relative_find_friend).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent_relative_find_friend=new Intent(getActivity(),FindFriendActivity.class);
                startActivity(intent_relative_find_friend);
            }
        });
    }
}
